package org.example.dormsystem.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.dormsystem.pojo.Dormitory;
import org.example.dormsystem.pojo.Student;

import java.util.List;

@Mapper
public interface DormitoryMapper {
    @Select("select * from dormitory where roomNumber = #{dormitoryNumber}")
    Dormitory findDormIdByStudentId(String dormitoryNumber);

    @Select("select * from student where dormitoryNumber = #{roomNumber}")
    List<Student> findStudentByRoomNumber(String roomNumber);
}
